package gtkwire.gobject;



public class GtkTreeRowReference extends GtkTreeRow
{
	private static int nextId = 0;
	private int id;
	private int stamp;
	private GtkTreeModel gTreeModel;
	private int[] address;

	/**
	* AFter creating you mustr call update to see if reference is actually succesfully connected.
	* if this was valid after creation or update it will be valid if isUpToDate() return true.
	* If is up to date returns fale update() must be called to 
	*/
	public GtkTreeRowReference( String path, GtkTreeModel gTreeModel )
	{
		super( path, gTreeModel );
	}

	public GtkTreeRowReference( int index, int level, int[] indices, GtkTreeModel gTreeModel  )
	{
		super( index, level, indices, gTreeModel );
	}

	public GtkTreeRowReference( GtkTreeRow iter )
	{
		super( iter );
		id = nextId;
		nextId++;
	}

	public boolean isUpToDate()	
	{
		return (stamp == gTreeModel.currentStamp());
	}
	
	public void update()
	{
		//get current adress from native side.
		//if fails 
	}

	/**
	* Falg for this set after update (and creation)
	*/
	public boolean isValid()
	{
		return false;
	}


}//end class